package com.xuyiwei.xblog.core.exception;

/**
 * Guns异常枚举
 *
 * @author fengshuonan
 * @Date 2017/12/28 下午10:33
 */
public enum GunsExceptionEnum implements ServiceExceptionEnum {

    NULL("-9999999", "NULL"),
    SUCCESS("200", "成功"),
    COMMON_ERROR("400", "通用失败"),
    PARAM_ERROR("401", "参数不正确"),
    FORBIDDEN("403", "访问被拒绝"),
    DB_ERROR("501", "服务繁忙,请重试."),
    SERVICE_ERROR("500", "服务繁忙,请重试."),


    /**
     * 其他
     */
    INVLIDE_DATE_STRING("400", "输入日期格式不对"),

    /**
     * 其他
     */
    WRITE_ERROR("500", "渲染界面错误"),

    /**
     * 文件上传
     */
    FILE_READING_ERROR("400", "FILE_READING_ERROR!"),
    FILE_NOT_FOUND("400", "FILE_NOT_FOUND!"),

    /**
     * 错误的请求
     */
    REQUEST_NULL("400", "请求有错误"),
    SERVER_ERROR("500", "服务器异常");

    GunsExceptionEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    private String code;

    private String message;

    @Override
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
